vector<string> summaryRanges(vector<int> &nums) {
	vector<string> s;
	if (nums.size() == 0)
		return s;
	if (nums.size() == 1) {
		s.push_back(to_string(nums[0]));
		return s;
	}
	int i = 0, j = 0, n = nums.size();
	string t;
	for (; j < n - 1; j++) {
		if (nums[j] + 1 != nums[j + 1]) {
			if (i == j)
				s.push_back(to_string(nums[i]));
			else
				s.push_back(to_string(nums[i]) + "->" + to_string(nums[j]));
			i = j + 1;
		}
	}
	if (i == j)
		s.push_back(to_string(nums[i]));
	else
		s.push_back(to_string(nums[i]) + "->" + to_string(nums[j]));

	return s;
}